package com.hy.common.utils;

import java.lang.reflect.Field;

public class MyObjectUtils {




    public static  boolean isNotBlank(Object o){


        return o != null && !o.equals("");
    }

    public static boolean areAllFieldsNull(Object obj) {
        if (obj == null) {
            return true;
        }

        Class<?> clazz = obj.getClass();
        Field[] fields = clazz.getDeclaredFields();
        for (Field field : fields) {
            try {
                field.setAccessible(true);
                Object value = field.get(obj);
                if (value != null) {
                    return false;
                }
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }

        return true;
    }
}
